package cyber2d.core.objects;

/*
 * 
 * Class taht can store 1 item.  
 */
public class Slot
{
	String type; //identifies type of slot (inv, weapon, implant, etc)
	boolean available; //identify if item can be placed in that slot
	Item item; //item that currently in slot
	
	public Slot()
	{
		this("any");
	}
	
	public Slot(String type)
	{
		this.type = type;
		this.available = true;
		
	}
	
	
	public boolean addItem(Item i)
	{
		//if conditions ok, and available
		if((true)&&(available)) //TODO: set condition check instead of true
		{
			//add, return true
			item = i;
			return true;
		}
		//else return false
		return false;
	}
	
	public boolean removeItem()
	{
		//if available
		if(available)
		{
			//remove, return true
			item = null;
		}
		//else return false
		return false;
	}
}
